#ifndef __UISHELLDOWNBAR__H__
#define __UISHELLDOWNBAR__H__

#include <MZFCLIB.h>

#include	"iUiButton.h"
#include	"UiStatusBar.h"
#include "SHIImaging.h"

typedef enum _tagShellDownBarBtnDisplay
{
	SHELL_DOWNBAR_PAGE_ONE = 0,
	SHELL_DOWNBAR_PAGE_TWO,
	SHELL_DOWNBAR_PAGE_THREE,
	SHELL_DOWNBAR_CHANGE_BKGND,
	MAX_SHELL_DOWNBAR_BTN,
} SHELL_DOWNBAR_BTN;

enum
{
	TIME_FORMAT_UNKNOWN = 0,
	TIME_FORMAT_12,
	TIME_FORMAT_24
};

class UiShellDownBar :
	public UiWin
{
public:
	UiShellDownBar();
	~UiShellDownBar();

	BOOL InitUiWin(void);

	void PaintWin(HDC hdc, RECT* prcWin, RECT* prcUpdate);
	virtual int OnLButtonDown(UINT fwKeys, int xPos, int yPos);
	virtual int OnLButtonUp(UINT fwKeys, int xPos, int yPos);

	void LoadiInterItem();
	BOOL InitImages();
public:
	iUiButton m_BtnDownBar[MAX_SHELL_DOWNBAR_BTN];
	ImagingHelper	*m_DownBarBG;

	HDC				m_hBakDC;
	HBITMAP			m_hBitmapBakDC;
//	HWND	m_hWnd;
//jdhuang 20100107
//	static	SHIImaging	sm_CalendarDateImage[10];
//	static	BOOL		sm_bInitCalendarData;
public:
	RECT	m_rcTime;
	RECT	m_rcDate;
	int				m_nTimeFormat;

	UINT			m_uTimeMinute;
	UINT			m_uDate;
//	UINT			m_uWeek;

	virtual int OnTimer(UINT uID);
	void UpdateTime();
	void UpdateDate();
	void DrawTime(HDC hDC, RECT* prcWin, RECT* prcUpdate);
	void DrawDate(HDC hDC, RECT* prcWin, RECT* prcUpdate);

	void SetTimer();
private:
//	static void UpdateCalendarOnItsIcon(HDC hdc, RECT &rcIcon);	
	SHIImaging		m_TimeNumberImage[10];
	SHIImaging		m_TimeDotImage;
};

#endif